package com.cjx.yuanshenstartforumbackend.controller;

import com.cjx.yuanshenstartforumbackend.common.BaseResponse;
import com.cjx.yuanshenstartforumbackend.domain.ArticleCategory;
import com.cjx.yuanshenstartforumbackend.domain.vo.ArticleCategoryVo;
import com.cjx.yuanshenstartforumbackend.service.ArticleCategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * @Description 文章类别Controller层
 * @Author cjx
 * @Date 2023/12/23 11:14
 **/

@RestController
@RequestMapping("/category")
public class ArticleCategoryController {

    @Resource
    private ArticleCategoryService articleCategoryService;

    @GetMapping("/getCategory")
    public BaseResponse<HashMap<String, List<ArticleCategoryVo>>> getCategory(){
        return articleCategoryService.getCategory();
    }


}
